﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using HMS_Hospital_Team2._6.DA;
using HMS_Hospital_Team2._6.DO;

namespace HMS_Hospital_Team2._6.BL
{
    class NhanVienBL
    {
        NhanVienDA nv = new NhanVienDA();
        public DataTable LoadDuLieuBL()
        {
            return nv.LoadDanhsachNVDA();
        }
        public DataTable LoadChucVuBL()
        {
            return nv.LoadChucVuDA();
        }
        public static void ThemMoiNhanVien(string SManhanvien, string SHovaten, string sdidong,string sdienthoaiban, bool BlGioitinh
            , DateTime DaNgaysinh, int iMachucvu, string STendangnhap, string SMatkhau, int IQuyen, bool BlTrangThai)
        {
            DA.NhanVienDA.ThemMoiNhanVien(SManhanvien, SHovaten, sdidong,sdienthoaiban, BlGioitinh, DaNgaysinh, iMachucvu, STendangnhap,
                SMatkhau, IQuyen, BlTrangThai);
        }

        public static void CapnhatthongtinNV(string SManhanvien, string SHovaten, string sdidong, string sdienthoaiban, bool BlGioitinh
            , DateTime DaNgaysinh, int iMachucvu, string STendangnhap, string SMatkhau, int IQuyen, bool BlTrangThai)
        {
            DA.NhanVienDA.CapnhatthongtinNV(SManhanvien, SHovaten, sdidong, sdienthoaiban, BlGioitinh, DaNgaysinh, iMachucvu, STendangnhap,
                SMatkhau, IQuyen,BlTrangThai);
        }

        public static bool checkdangnhap(string stendangnhap, string password)
        {
            return DA.NhanVienDA.checkdangnhap(stendangnhap, password);
        }

        public static List<phanquyen> Loadthongtindangnhap(string sTendangNhap, string sMatkhau)
        {
            return DA.NhanVienDA.Loadthongtindangnhap(sTendangNhap,sMatkhau);
        }

        public static void thaydoimatkhau(string smanhanvien, string smatkhauht, string smatkhaumoi)
        {
            DA.NhanVienDA.thaydoimatkhau(smanhanvien, smatkhauht, smatkhaumoi);
        }
    }
}
